{extend name="template/base" /}
{block name="content"}
<div class="page-container">
    <div class="cl pd-5 bg-1 bk-gray">
        <span class="l">

        </span>
        <span class="r pt-5 pr-5">
            <!--共有数据 ：<strong>{$count ?? '0'}</strong> 条-->
        </span>
    </div>
    <table class="table table-border table-bordered table-hover table-bg mt-20">
        <thead>
        <tr class="text-c">
            <th width="25"><input type="checkbox"></th>
            <th width="">id</th>
            <th width="">订单id</th>
            <th width="">是否解决</th>
            <th width="">退款</th>
            <th width="">旅客不一致</th>
            <th width="">更换司机</th>
            <th width="70">操作</th>
        </tr>
        </thead>
        <tbody>
        {volist name="list" id="vo"}
        <tr class="text-c">
            <td><input type="checkbox" name="id[]" value="{$vo.id}"></td>
            <td>{$vo.id}</td>
            <td>{$vo.oid}</td>
            <td>{if condition="(!empty($vo['solve']))"}已解决{else /}未解决{/if}</td>
            <td>{if condition="(!empty($vo.is_refund))"}退款{else /}无{/if}</td>
            <td>{if condition="(!empty($vo.traveler_change))"}游客变动{else /}游客没变动{/if}</td>
            <td>{if condition="(!empty($vo.driver_change))"}司机变动{else /}司机没变动{/if}</td>
            <td class="f-14">
                {if condition="(empty($vo['solve']))"}<a href="javascript:;"
                                                         onclick="solve('/admin/exceptional_order/solve/id/{$vo.id}')"
                                                         class="label label-warning radius" title="已解决">已解决</a>{/if}

            </td>
        </tr>
        {/volist}
        </tbody>
    </table>
    <div class="page-bootstrap">{$page ?? ''}</div>
</div>
{/block}
{block name="script"}
<script>
    function solve(url) {
        $.ajax({
            type: 'POST',
            url: url,
            data: null,
            success: function (re) {
                layer.msg(re.msg, {
                    time: 2000, //20s后自动关闭
                }, function () {
                    //关闭后的操作
                    location.reload();
                });

            },
        });
    }
</script>
{/block}


